home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / include / user / RCS / testRedef.h,v < prev    next >
Encoding:
Text File  |  1992-07-17  |  1.8 KB  |  67 lines

  1. head     1.1;
  2. branch   ;
  3. access   ;
  4. symbols  srv030:1.1 srv027:1.1 srv026:1.1 srv024:1.1 srv021:1.1 srv019:1.1 srv018:1.1 srv016:1.1 srv014:1.1 srv010:1.1 srv008:1.1 srv007:1.1 srv006:1.1 srv005:1.1 srv004:1.1 srv003:1.1 srv002:1.1 srv001:1.1;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.1
  10. date     92.03.23.14.20.34;  author kupfer;  state Exp;
  11. branches ;
  12. next     ;
  13.  
  14.  
  15. desc
  16. @Hack so that programs written using the Test_ I/O routines will still work
  17. with stdio and /dev/console in place.
  18. @
  19.  
  20.  
  21.  
  22. 1.1
  23. log
  24. @Initial revision
  25. @
  26. text
  27. @/*
  28.  * testRedef.h --
  29.  *
  30.  *    Redefinitions of "test" routines for use with /dev/console.
  31.  *
  32.  * Copyright 1992 Regents of the University of California
  33.  * Permission to use, copy, modify, and distribute this
  34.  * software and its documentation for any purpose and without
  35.  * fee is hereby granted, provided that this copyright
  36.  * notice appears in all copies.  The University of California
  37.  * makes no representations about the suitability of this
  38.  * software for any purpose.  It is provided "as is" without
  39.  * express or implied warranty.
  40.  *
  41.  * $Header: /sprite/lib/forms/RCS/proto.h,v 1.8 92/03/02 15:32:57 bmiller Exp $ SPRITE (Berkeley)
  42.  */
  43.  
  44. #ifndef _TESTREDEF
  45. #define _TESTREDEF
  46.  
  47. /* 
  48.  * This might cause some problems if this header file is included in the 
  49.  * middle of a function, but only if stdio.h wasn't already included.
  50.  */
  51. #include <stdio.h>
  52.  
  53. /* 
  54.  * There isn't a trivial equivalent for Test_PutTime.  It was a 
  55.  * special-purpose hack, anyway, so don't bother fixing it here.
  56.  */
  57.  
  58. #define Test_PutDecimal(val)    printf("%d", (val))
  59. #define Test_PutHex(val)    printf("0x%x", (val))
  60. #define Test_PutOctal(val)    printf("0%o", (val))
  61. #define Test_PutMessage(str)    printf("%s", (str))
  62. #define Test_PutString(str)    printf("%s", (str))
  63. #define Test_GetString(buf, bufLen)    fgets((buf), (bufLen), stdin)
  64.  
  65. #endif /* _TESTREDEF */
  66. @
  67.